package Reflect;

import Reflect.annotations.AutoRunMethod;

import java.lang.reflect.Method;

public class ReflectDemo8 {
    public static void main(String[] args) throws Exception {

        Class cls = Class.forName("Reflect.Person");
        Method[] methods = cls.getDeclaredMethods();
        for (Method method : methods){
            if (method.isAnnotationPresent(AutoRunMethod.class)) {

                AutoRunMethod arm = method.getAnnotation(AutoRunMethod.class);
                System.out.println(method.getName()+"方法参数："+arm.value());


            }
        }

    }
}
